#pragma once
#include "gamePhase.h"
#include "map.h"
#include "game.h"
class MainMenuPhase: public GamePhase
{
private:
	Map m_menu;
	Game * g;	//A pointer to the game object
public:
	MainMenuPhase(char * a_filename, Game * a_game)
	{
		m_menu.loadFile(a_filename);
		g = a_game;
	}

	void update(int a_ms)
	{
		switch(returnInput())
		{
		case '1':
			{
				undraw();
				g->setState(NEW_POT);
				break;
			}
		default:
			break;
		}
		getInput(0);
	}
	void draw()
	{
		SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), WHITE);
		m_menu.draw(0,0);
	}

	void undraw()
	{
		m_menu.undraw();
	}
};